package demoMod.stsconsole.map;

public class MapEdge implements Comparable<MapEdge> {
    public int srcX;
    public int srcY;
    public int dstX;
    public int dstY;

    public MapEdge(int srcX, int srcY, int dstX, int dstY) {
        this.srcX = srcX;
        this.srcY = srcY;
        this.dstX = dstX;
        this.dstY = dstY;
    }

    @Override
    public int compareTo(MapEdge e) {
        if (this.dstX > e.dstX) {
            return 1;
        } else if (this.dstX < e.dstX) {
            return -1;
        } else return Integer.compare(this.dstY, e.dstY);
    }
}
